// 将uni.request请求转化成promise对象

function uniToPromise(method, options){
	return new Promise((resolve, reject) => {
		options.success = resolve;
		options.fail = (err) =>{
			reject(err)
		}
		uni[method](options)
	})
}

export {
	uniToPromise
}